﻿using AutoMapper;
using Provenance.Domain.Product;
using Provenance.Domain.User;
using Provenance.Read.Api.Application.Command;
using Provenance.Read.Api.Dto.Product;
using Provenance.Read.Api.Dto.User;

namespace Provenance.Read.Api
{
    public class MappingFiles:Profile
    {
        public MappingFiles()
        {
            CreateMap<LoginResponseDTO, UserInfo>().ReverseMap();

            CreateMap<GetUserListResponseDTO, UserInfo>().ReverseMap();
            CreateMap<BackUserCommandResponseDTO, UserInfo>().ReverseMap();

            CreateMap<GetRoleListResponseDTO,Role>().ReverseMap();
            CreateMap<BackRoleResponseDTO,Role>().ReverseMap();

            CreateMap<GetTreePermissionListResponseDTO,Permission>().ReverseMap();
            CreateMap<GetPermissionListResponseDTO,Permission>().ReverseMap();
            CreateMap<BackPermissionResponseDTO,Permission>().ReverseMap();
           
            CreateMap<GetApiPermissionListResponseDTO,ApiPermission>().ReverseMap();


            CreateMap<GetProductInfoResponseDTO,ProductInfo>().ReverseMap();
            CreateMap<BackProductInfoResponseDTO,ProductInfo>().ReverseMap();

            CreateMap<GetProductListResponseDTO,Product>().ReverseMap();

            CreateMap<GetPictureInfoResponseDTO,PictureInfo>().ReverseMap();


        }
    }
}
